package com.csyf.manager.entity;

import cn.afterturn.easypoi.excel.annotation.Excel;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * @author Enzo
 */

@Data
@Table(name = "sys_trade")
public class SysTrade implements Serializable {

    /**
     *
     */
    private static final long serialVersionUID = 1L;
    private String orderId;
    //private String body;
    private Long agentId;
    @Excel(name = "商户名称", orderNum = "0", width = 30D)
    private String agentName;
    @Excel(name = "订单号", orderNum = "2", width = 40D)

    @Id
    private String outTradeNo;
    @Excel(name = "商户号", orderNum = "1",width = 25D)
    private String mchId;
    private String mchName;
    @Excel(name = "交易状态", orderNum = "8", replace = {"交易失败_TRADE_FAILE", "等待支付_WAIT_BUYER_PAY", "交易成功_TRADE_SUCCESS"})
    private String tradeStatus;
    private String srcReason;
    private String notifyUrl;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @Excel(name = "创建时间", orderNum = "7",  width = 20D,format = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date payTime;
    @Excel(name = "交易金额", orderNum = "4", width = 15D,type = 10)
    private BigDecimal totalFee;
    @Excel(name = "支付类型", orderNum = "6", width = 15D)
    private String serviceType;

    private String srcMchId;
    @Excel(name = "商户收益", orderNum = "5", width = 15D, type = 10)
    private BigDecimal profit;
    private String srcOrderNo;


    @Transient
    private String createTimeString;

    @Transient
    private String endTimeString;

    private String notifyStatus;

    private BigDecimal costprofit;



}
